package com.bionic.banking.auth.manager;

import java.util.ResourceBundle;

public class Config 
{
    private static Config instance=null;        
 
    private ResourceBundle resource;
    
    public static final String DATASOURCE="DATASOURCE";
    
    public static final String BUNDLE_NAME = "com.bionic.banking.auth.manager.config";
    public static final String DRIVER = "DRIVER";
    public static final String URL = "URL";
    public static final String DBUser = "DBUser";
    public static final String DBPwd = "DBPwd";
            
    public static final String MAIN = "MAIN";
    public static final String ERROR = "ERROR";
    public static final String LOGIN = "LOGIN";
    public static final String USER_SESSION_KEY = "user";    
    
    
    public static final String CREATE_CUSTOMER = "CREATE_CUSTOMER";    
    public static final String CREATE_BANKACCOUNT = "CREATE_BANKACCOUNT";    
    public static final String CREATE_BANKTRANSACTION = "CREATE_BANKTRANSACTION";
    
    public static final String EDIT_CUSTOMER = "EDIT_CUSTOMER";
    public static final String EDIT_BANKACCOUNT = "EDIT_BANKACCOUNT";
    public static final String VIEW_BANKTRANSACTION = "VIEW_BANKTRANSACTION";
    
    public static final String CUSTOMERLIST = "CUSTOMERLIST";
    public static final String BANKACCOUNTLIST = "BANKACCOUNTLIST";   
    public static final String BANKTRANSACTIONLIST = "BANKTRANSACTIONLIST";
    
    public static Config getInstance()
    {
        if(instance == null) {
            instance = new Config();
        }
        instance.resource = ResourceBundle.getBundle(BUNDLE_NAME);
        return instance;
    }
    
    public String getProperty(String key)
    {
        return (String)resource.getObject(key);
    }   
}
